*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(#141e30, #243b55);
}

.login {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 400px;
    padding: 40px;
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.4);
}

.login h2 {
    color: #fff;
    margin-bottom: 30px;
}

.login .login_box {
    position: relative;
    width: 100%;
}

.login .login_box input {
    width: 100%;
    padding: 10px 0;
    outline: none;
    border: none;
    background-color: transparent;
    margin-bottom: 30px;
    color: #fff;
    font-size: 16px;
    border-bottom: 1px solid #fff;
}

.login .login_box label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    color: #fff;
    /* 这个属性的默认值是 auto，默认是这个元素可以被点击，设置为 none 就是不能被点击，就好像它可见但不可用 */
    pointer-events: none;
    /* 设置过渡 */
    transition: all .5s;
}

/*
    :focus：input 获取焦点触发
    :valid: 判断 input 框的内容是否合法，我们在初始设置 input 输入框时，添加了 required 属性，这个得搭配它才能起效果
*/
.login .login_box input:focus + label,
.login .login_box input:valid + label {
    top: -20px;
    color: #03e9f4;
    font-size: 12px;
}

.login a {
    overflow: hidden;
    position: relative;
    padding: 10px 20px;
    color: #03e9f4;
    text-decoration: none;
    /* 设置过渡 */
    transition: all .5s;
}

.login a:hover {
    color: #fff;
    border-radius: 5px;
    background-color: #03e9f4;
    box-shadow: 0 0 5px #03e9f4, 0 0 25px #03e9f4, 0 0 50px #03e9f4, 0 0 100px #03e9f4;
}

.login a span {
    position: absolute;
}

.login a span:first-child {
    top: 0;
    left: -100%;
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, transparent, #03e9f4);
    animation: move1 1s linear infinite;
}

.login a span:nth-child(2) {
    right: 0;
    top: -100%;
    width: 2px;
    height: 100%;
    background: linear-gradient(transparent, #03e9f4);
    animation: move2 1s linear .25s infinite;
}

.login a span:nth-child(3) {
    right: -100%;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to left, transparent, #03e9f4);
    animation: move3 1s linear .5s infinite;
}

.login a span:nth-child(4) {
    left: 0;
    bottom: -100%;
    width: 2px;
    height: 100%;
    background: linear-gradient(#03e9f4, transparent);
    animation: move4 1s linear .75s infinite;
}

/* 设置动画 */
@keyframes move1 {
    0% {
        left: -100%;
    }
    50%,
    100% {
        left: 100%;
    }
}
@keyframes move2 {
    0% {
        top: -100%;
    }
    50%,
    100% {
        top: 100%;
    }
}
@keyframes move3 {
    0% {
        right: -100%;
    }
    50%,
    100% {
        right: 100%;
    }
}
@keyframes move4 {
    0% {
        bottom: -100%;
    }
    50%,
    100% {
        bottom: 100%;
    }

}
